import VueRouter from "vue-router";

import home from './components/tabbar/home.vue';
import member from './components/tabbar/member.vue';
import car from './components/tabbar/car.vue';
import search from './components/tabbar/search.vue';
// 新闻模块组件
import newList from './components/news/newList.vue';
import newInfo from './components/news/newInfo.vue';
// 图片分享组件
import photosList from './components/photos/photosList.vue';
import photoInfo from './components/photos/photoInfo.vue';
// 商品组件
import goodsList from './components/goods/goodsList.vue';
import goodsInfo from './components/goods/goodsInfo.vue';
import goodsDesc from './components/goods/goodsDesc.vue';
import goodsCmt from './components/goods/goodsComment.vue';

var router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home' },
        { path: '/home', component: home },
        { path: '/member', component: member },
        { path: '/car', component: car },
        { path: '/search', component: search },
        { path: '/home/newlist', component: newList },
        { path: '/home/newInfo/:id', component: newInfo },
        { path: '/home/photosList', component: photosList },
        { path: '/home/photoInfo/:id', component: photoInfo },
        { path: '/home/goodsList', component: goodsList },
        { path: '/home/goodsInfo/:id', component: goodsInfo, name: 'goodsInfo' },
        { path: '/home/goodsDesc/:id', component: goodsDesc, name: 'goodsDesc' },
        { path: '/home/goodsComment/:id', component: goodsCmt, name: 'goodsCmt' },
    ],
    linkActiveClass: 'mui-active'
})

export default router